// ----------------------------------------------------------------------------
// serialize_string_pointer_member.h
// ----------------------------------------------------------------------------
#pragma once
#include <fw/base/serialize/serialize_pointer_member.h>
#include <fw/base/serialize/serialize_scalar_value.h>
#include <fw/base/runtime/hash.h>

namespace fw
{
	class SerializeCompoundType;
	class ByteReader;
	class ByteWriter;
	
	class SerializeStringPointerMember : public SerializePointerMember
	{
	private:
		SerializeScalarValue	m_terminatorValue;
		Hash					m_terminatorName;
		
	public:
		SerializeStringPointerMember(int count, Hash typeName, Hash terminatorName, const SerializeScalarValue& terminatorValue);
		
		virtual int				GetPointerCount(const char* scopeData, int index) const;
		virtual uint64_t		GetChecksum(uint64_t basis) const;
		
		virtual void							Write  (ByteWriter& writer) const;
		static SerializeStringPointerMember*	ReadNew(ByteReader& reader);
		
	}; // class SerializePointerMember
	
} // namespace fw
